package com.iflysse.dao;

import com.iflysse.pojo.po.common.CommonPoResp;
import com.iflysse.pojo.po.req.AddResourceDocPoReq;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

@Repository
public interface ResourceDocDao {
    /**
     * 添加Doc资源
     * @param addResourceDocPoReq doc资源请求对象
     * @return
     */
    @Insert({
            "insert into tb_resource_doc (resource_id,doc_name,doc_path,doc_type,doc_size) values (UUID(),#{docName},#{docPath},#{docType},#{docSize})"
    })
    @Options(useGeneratedKeys = true, keyProperty = "resource_id")
    int addResourceDoc(AddResourceDocPoReq addResourceDocPoReq) throws SQLException;
}
